using NHibernate;
using Wikey.Domain.Components;
using Wikey.Entity;

namespace Wikey.Domain.Repository
{
    public interface ICommentRepository
    {
        int Save(Comment comment);
    }

    public class CommentRepository : Repository, ICommentRepository
    {
        public CommentRepository(ISessionSource source) : base(source)
        {
        }

        public CommentRepository(ISession session) : base(session)
        {
        }

        public int Save(Comment comment)
        {
            base.Save(comment);

            return comment.Id;
        }
    }
}